#include "settingdialog.h"
#include "ui_settingdialog.h"

SettingDialog::SettingDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::SettingDialog)
{
    ui->setupUi(this);
}

SettingDialog::~SettingDialog()
{
    delete ui;
}


void SettingDialog::on_buttonBox_accepted()
{
    m_strName = ui->lineEdit_Name->text();
    m_strAuthor = ui->lineEdit_Author->text();
    m_strVersion = ui->lineEdit_Version->text();
    m_strTemplate = ui->comboBox_Template->currentText();
}

void SettingDialog::on_buttonBox_rejected()
{

}

QString SettingDialog::strTemplate() const
{
    return m_strTemplate;
}

void SettingDialog::setStrTemplate(const QString &strTemplate)
{
    m_strTemplate = strTemplate;
}

QString SettingDialog::strAuthor() const
{
    return m_strAuthor;
}

void SettingDialog::setStrAuthor(const QString &strAuthor)
{
    m_strAuthor = strAuthor;
    ui->lineEdit_Author->setText(m_strAuthor);
}

QString SettingDialog::strVersion() const
{
    return m_strVersion;
}

void SettingDialog::setStrVersion(const QString &strVersion)
{
    m_strVersion = strVersion;
    ui->lineEdit_Version->setText(m_strVersion);
}

QString SettingDialog::strName() const
{
    return m_strName;
}

void SettingDialog::setStrName(const QString &strName)
{
    m_strName = strName;
    ui->lineEdit_Name->setText(m_strName);
}
